
<div class="form-group">
	<div class="alert alert-warning-light no-margin">
		基础信息
	</div>
</div>
<div class="form-group">

	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">工单编号:</span>
			{$row.workorder_number}
		</div>
	</div>
	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">工单标题:</span>
			{$row.title}
		</div>
	</div>
	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">关联客户:</span>
			<a class="btn-dialog" data-url="qingdongams/customer/customer/detail?ids={$row.customer_id}" data-area=["90%","90%"] data-title="客户详情" >{$row.customer.name}</a>
		</div>
	</div>
	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">客户联系人:</span>
			{$row.contacts.name}
		</div>
	</div>
	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">过保类型:</span>
			{eq name="$row.is_over" value="1"}过保{else/}未过保{/eq}
		</div>
	</div>


	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">预约时间:</span>
			{$row.appointment_time}
		</div>
	</div>

	<div class="col-xs-10 col-sm-10">
		<div class="form-group col-sm-10">
			<span class="text-muted">备注:</span>
			{$row.remarks}
		</div>
	</div>



	<div class="col-xs-12 col-sm-12">
		<div class="form-group col-sm-10">
			<span class="text-muted">附件:</span>
			{if condition="$row.file"}
			<div class="well">
				<div class="thumbnail">
					{foreach name="row.file" item="val"}
					<img data-tips-image src="{$val.file_path}" alt="">
					{/foreach}
				</div>
			</div>
			{/if}
		</div>
	</div>

</div>

{notempty name="$row.product_part"}
<div class="form-group">
	<div class="alert alert-warning-light no-margin">
		产品信息
	</div>
</div>
<div class="form-group">
	<div class="col-xs-12 col-sm-12">
		<table class="table table-striped table-bordered table-hover table-nowrap"
			   width="100%">
			<thead>
			<tr>
				<th>产品名称</th>
				<th>产品编码</th>
				<th>设备状态</th>
				<th>安装附件</th>
			</tr>
			</thead>
			<tbody>

			{foreach name="row.product_part" item="val"}
			<tr>
				<td>{$val.product.name}</td>
				<td>{$val.number}</td>
				<td>{$val.status}</td>
				<td>
					{foreach name="val.file_ids" item="file"}
					<a href="{$file}" target="_blank">
						<img data-tips-image src="{$file}" class="img-sm img-center" width="100">
					</a>
					{/foreach}
				</td>

			</tr>
			{/foreach}
			</tbody>
		</table>
	</div>

</div>
{/notempty}

<div class="form-group">
	<div class="alert alert-warning-light no-margin">
		维修结果
	</div>
</div>
<div class="form-group">

	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">维修结果:</span>
			{eq name="$row.mobile_result" value="1"}
			已解决
			{else/}
			未解决
			{/eq}
		</div>
	</div>
	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">是否发送配送:</span>
			{empty name="$row.use_parts"}
			否
			{else/}
			是
			{/empty}
		</div>
	</div>
	{notempty name="$row.use_parts"}
	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">使用配件:</span>
			<table class="table table-striped table-bordered table-hover table-nowrap"
				   width="100%">
				<thead>
				<tr>
					<th>配件图片</th>
					<th>配件名称</th>
					<th>配件编码</th>
					<th>数量</th>
				</tr>
				</thead>
				<tbody>

				{foreach name="row.use_parts" item="val"}
				<tr>
					<td><a href="javascript:void(0)" data-tips-image="{$val.img|default="-"}">
						<img src="{$val.img|default="-"}" class="img-sm img-center" width="100"></a></td>
					<td>{$val.name|default="-"}</td>
					<td>{$val.num}</td>
					<td>{$val.number}</td>
				</tr>
				{/foreach}
				</tbody>
			</table>
		</div>
	</div>
	{/notempty}
	<div class="col-xs-6 col-sm-5">
		<div class="form-group col-sm-10">
			<span class="text-muted">解决情况说明:</span>
			{$row.desc}
		</div>
	</div>
</div>

<div class="form-group">
	<div class="alert alert-warning-light no-margin">
		收费信息
	</div>
</div>

<div class="form-group">

	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<b>完成工作时间:</b>{$row.end_time}
		</div>
	</div>
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<b>含税方式:</b>
			{$row.tax}
		</div>
	</div>
	{if condition="$row.pay_service"}
	<div class="col-xs-12 col-sm-10">
		<div class="form-group col-sm-10">
			{foreach name="row.pay_service" item="val"}
			<p>
				<span>{$val.name}：</span>
				<span >{$val.money}元</span>
			</p>
			{/foreach}
		</div>
	</div>
	{/if}
	<div class="col-xs-12 col-sm-10">
		<div class="form-group col-sm-10">
			<b>配件费用:</b>
			<table class="table table-striped table-bordered table-hover table-nowrap"
				   width="100%">
				<thead>
				<tr>
					<th>配件名称</th>
					<th>数量</th>
					<th>金额</th>
					<th>是否收费</th>
				</tr>
				</thead>
				<tbody>

				{foreach name="row.use_parts" item="val"}
				<tr>
					<td>{$val.name|default="-"}</td>
					<td>{$val.number}</td>
					<td>{$val.price}</td>
					<td>{eq name="$val.is_charge" value="1"}是{else/}否{/eq}</td>
				</tr>
				{/foreach}
				</tbody>
			</table>
		</div>
	</div>

	<div class="col-xs-12 col-sm-3">
		<div class="form-group col-sm-10">
			<b>总费用:</b>
			{$row.total_money}元
		</div>
	</div>
	<div class="col-xs-12 col-sm-3">
		<div class="form-group col-sm-10">
			<b>优惠费用:</b>
			{$row.discount_money}元
		</div>
	</div>
	<div class="col-xs-12 col-sm-3">
		<div class="form-group col-sm-10">
			<b>收取费用:</b>
			{$row.money}元
		</div>
	</div>
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<b>是否收费:</b>
			{eq name="$row.is_charge" value="1"}
			收费
			{/eq}
			{eq name="$row.is_charge" value="2"}
			不收费
			{/eq}
		</div>
	</div>
	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<b>优惠备注:</b>
			{$row.discount_desc}
		</div>
	</div>

	<div class="col-xs-12 col-sm-6">
		<div class="form-group col-sm-10">
			<b>收款账号:</b>
			{$row.collection_account}
		</div>
	</div>
	<div class="col-xs-12 col-sm-12">
		<div class="form-group col-sm-10">
			<b>收款账号（图）:</b>
			{if condition="$row.collection_img"}
			<div class="well">
				<div class="thumbnail">
					{foreach name="row.collection_img" item="val"}
					<a href="{$val.url}" target="_blank"><img data-tips-image src="{$val.url}" alt=""></a>
					{/foreach}
				</div>
			</div>
			{/if}
		</div>
	</div>

</div>